package com.gyf.crm.web.controller;

import com.gyf.crm.model.PageResult;
import com.gyf.crm.model.Student;
import com.gyf.crm.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("stu")
public class StudentController {
    @Autowired
    private IStudentService studentService;

    @RequestMapping("index")
    public String index(){
        return "stu/index";
    }

    @RequestMapping("list")
    @ResponseBody
    public PageResult<Student> list(){
        PageResult<Student> prlt = new PageResult<Student>();
        prlt.setData(studentService.findListByQQNo("12"));
        return prlt;
    }
}
